home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / August 96 / Re Scripting Problem < prev    next >
Encoding:
Internet Message Format  |  1996-08-02  |  1.0 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Scripting Problem
  2. Sent:        8/1/96 8:09 PM
  3. Received:    8/2/96 8:39 AM
  4. From:        Serge Froment, sfroment@odyssee.net
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >When I write a script like "get myProperty of first myClass", I actually
  9. >get the property. But when I write a script like "get first myClass", I get
  10. >an error message saying "Can't make myClass 1 into myClass 1". Similar
  11. >script with ODFDraw returns a result like "shape 1 of application ODFDraw
  12. >Sample".
  13.  
  14. I have found the problem: FW_MScriptable::GetProperty does handle both
  15. pClass and pIndex, but FW_MScriptable::HasProperty returns true only for
  16. pClass. I don't know if this is a bug of ODF or a feature. I have added
  17. pIndex to CMyScriptable::HasProperty, like ODFDraw does. Actually, I had to
  18. handle pIndex in CMyScriptable::GetProperty also because the method used by
  19. FW_MScriptable does not work when FW_MScriptable objects are generated on
  20. the fly like I do.
  21.  
  22. Serge
  23.  
  24.  
  25.